package com.mew.common.entity.statis;

import java.io.Serializable;
import java.util.Date;

import cn.hutool.core.date.DateUtil;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.*;


/**
 * <p>
 * 
 * </p>
 *
 * @author ztq
 * @since 2021-01-08
 */

@Data
@ToString
@TableName("s_gold_total")
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class GoldTotal extends Model<GoldTotal> {


    private Long id;

    /**
     * 转账
     */
//    @TableField("tra_gold")
//    private long traGold;

    /**
     * 后台上分
     */
    @TableField("up_gold")
    private long upGold;
    /**
     * 金币总和
     */
    @TableField("all_gold")
    private long allGold;

    @TableField(exist = false)
    private long change;

    @TableField(exist = false)
    private long changeUpGold;

    @Override
    protected Serializable pkVal() {
        return null;
    }

    public GoldTotal idTime(){
        this.id = Long.parseLong(DateUtil.format(new Date(), "yyyyMMdd"));
        return this;
    }
}
